package com.mxchip.livestarmobile.mobile.base

import android.content.Context
import android.widget.Toast
import androidx.fragment.app.Fragment
import com.mxchip.livestarmobile.mobile.Appli

fun Context.toast(message: CharSequence) =
    Toast.makeText(Appli.getContext(), message, Toast.LENGTH_SHORT).show()


fun Fragment.toast(message: CharSequence) = if (this.context != null)
    Toast.makeText(this.context, message, Toast.LENGTH_SHORT).show() else {
    Toast.makeText(Appli.getContext(), message, Toast.LENGTH_SHORT).show()
}